"""web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from . views import viewsIndex,viewsUsers,viewsCates,viewsGoods

urlpatterns = [
    #首页
    url(r'^$', viewsIndex.index,name="myadmin_index"),

    #用户管理
    url(r'^user/add/', viewsUsers.useradd,name="myadmin_user_add"),
    url(r'^user/index/', viewsUsers.userindex,name="myadmin_user_index"),
    url(r'^user/del/(?P<uid>[0-9]+)/$', viewsUsers.userdel,name="myadmin_user_del"),
    url(r'^user/edit/(?P<uid>[0-9]+)/$', viewsUsers.useredit,name="myadmin_user_edit"),


    #商品分类管理
    url(r'^cates/add/', viewsCates.catesadd,name="myadmin_cates_add"),
    url(r'^cates/index/', viewsCates.catesindex,name="myadmin_cates_index"),
    url(r'^cates/del/$', viewsCates.catesdel,name='myadmin_cates_del'),
    url(r'^cates/edit/$', viewsCates.catesedit,name='myadmin_cates_edit'),


    #商品管理
    url(r'^goods/add/', viewsGoods.goodsadd,name="myadmin_goods_add"),
    url(r'^goods/insert/$', viewsGoods.goodsinsert,name='myadmin_goods_insert'),
    url(r'^goods/index/', viewsGoods.goodsindex,name="myadmin_goods_index"),



]